import VueRouter from 'vue-router';
import index from '../../components/index/index.vue';
import home from '../../components/index/home.vue';
import classify from '../../components/index/classify.vue';
import star from '../../components/index/star.vue';
import shop from '../../components/index/shop.vue';
import my from '../../components/index/my.vue';
import morepro from '../../components/detail/morepro.vue';
import details from '../../components/detail/details.vue';
export default new VueRouter({
    routes:[
        {
            path:'/home',
            component:index,
            children:[
                {
                    path:'/home',
                    component:home,
                },
                {
                    path:'/classify',
                    component:classify,
                },
                {
                    path:'/star',
                    component:star,
                },{
                    path:'/shop',
                    component:shop
                },
                {
                    path:'/my',
                    component:my
                }
            ],
            redirect:'/home'
        },
        {
            path:'/morepro',
            component:morepro
        },
        {
            path:'/details',
            component:details
        },
        {
            path:'/*',
            redirect:'/home'
        }
    ]
})